package org.forum.controller;

import org.forum.controller.interceptor.DemographicStatistics;
import org.forum.utils.JsonUtil;
import org.json.JSONObject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class OnlineInfoController {
	
	Logger logger = LoggerFactory.getLogger(OnlineInfoController.class);
	
	JsonUtil jsonUtil = null;

	public void setJsonUtil(JsonUtil jsonUtil) {
		this.jsonUtil = jsonUtil;
	}


	/**
	 * @pass_Test
	 * 返回在线用户的总数
	 */
	public void userStatistics(){
		JSONObject jsonObject = new JSONObject();
		jsonObject.put("onineN", DemographicStatistics.getOnlineN());
		jsonUtil.outToJsonString(jsonObject.toString());
		
	}
}
